<template lang="pug">
  kalix-dialog.user-add(title='查看' bizKey="course" ref="kalixBizDialog" v-bind:formModel.sync="formModel" isView)
    div.el-form(slot="dialogFormSlot")
      el-form-item.short(label="授课教师" prop="uname" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.uname" readonly="readonly")
      el-form-item.short(label="课程名称" prop="name" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.name" readonly="readonly")
      el-form-item.short(label="课程照片" prop="photo" v-bind:label-width="labelWidth")
      kalix-upload.img-margin(v-model="formModel.photo" readonly="readonly")
      <!--kalix-img-upload.img-margin(v-model="formModel.photo" readonly="readonly")-->
      el-form-item.short(label="课程简介" prop="introduction" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.introduction" type="textarea" resize="none" rows="4" readonly="readonly")
      el-form-item.short(label="课程要点" prop="points" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.points" type="textarea" resize="none" rows="4" readonly="readonly")
      el-form-item.short(label="课时" prop="classHour" v-bind:label-width="labelWidth")
        el-input-number(v-model="formModel.classHour" :min="0" disabled)
      el-form-item.short(label="学分" prop="credit" v-bind:label-width="labelWidth")
        el-input-number(v-model="formModel.credit" :min="0" disabled)
      el-form-item.short(label="院系" prop="dname" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.dname" readonly)
      el-form-item.short(label="类别" prop="gname" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.gname" readonly)

</template>

<script type="text/ecmascript-6">
  import FormModel from './model'
  import {baseURL} from '../../../../../config/global.toml'
  import KalixClansmanUpload from '../../../../../components/fileUpload/upload'
  import KalixUpload from '../../../../../components/corelib/components/common/baseUpload'
  import KalixImgUpload from '../../../../../components/corelib/components/common/imgUpload'
  export default {
    name: 'CourseView',
    components: {KalixUpload, KalixClansmanUpload, KalixImgUpload},
    data() {
      return {
        formModel: Object.assign({}, FormModel),
        action: baseURL + '/camel/rest/upload',
        labelWidth: '120px'
      }
    },
    methods: {
      init(dialogOption) {
        console.log('---------dialogOption------------', dialogOption)
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">

</style>
